
TEST(swaptest, swap_ref)
{
	int a = 1;
	int b = 2;
	
	EXPECT_EQ(a, 1);
	EXPECT_EQ(b, 2);

	core::swap(a, b);

	EXPECT_EQ(a, 2);
	EXPECT_EQ(b, 1);
}

TEST(swaptest, swap_ptr)
{
	int a = 1; 
	int b = 2;
	int* pa = &a;
	int* pb = &b;

	EXPECT_EQ(*pa, 1);
	EXPECT_EQ(*pb, 2);

	core::swap(pa, pb);

	EXPECT_EQ(*pa, 2);
	EXPECT_EQ(*pb, 1);
}
